---
layout: default
class: home
css: ['pages/index.css']
comments: false
---

<section class="banner">
    <div class="collection-head">
        <div class="container">
            <div class="collection-title">
              <h1 class="collection-header" id="sub-title"><span>{{ site.subtitle }}</span></h1>
                <div class="collection-info">
					{% if site.location %}
                    <span class="meta-info mobile-hidden">
                        <span class="octicon octicon-location"></span>
                        {{ site.location }}
                    </span>
					{% endif %}
					{% if site.organization %}
                    <span class="meta-info">
                        <span class="octicon octicon-organization"></span>
                        <a href="{{ site.organization_url }}" target="_blank">{{ site.organization }}</a>
                    </span>
					{% endif %}
					{% if site.github_username %}
                     <span class="meta-info">
                        <span class="octicon octicon-mark-github"></span>
                        <a href="https://github.com/{{ site.github_username }}" target="_blank">{{ site.github_username }}</a>
                    </span>
					{% endif %}
                </div>
            </div>
        </div>
    </div>
</section>
<!-- /.banner -->
<section class="container content">
    <div class="columns">
        <div class="column two-thirds" >
            <ol class="repo-list">
                {% for post in paginator.posts %}
                <li class="repo-list-item">
                    <h3 class="repo-list-name">
                      <a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a>
                    </h3>
                    <p class="repo-list-description">
                        {{ post.excerpt | strip_html | strip }}
                    </p>
                    <p class="repo-list-meta">
                        <span class="meta-info">
                          <span class="octicon octicon-calendar"></span> {{ post.date | date: "%Y/%m/%d" }}
                        </span>
                        {% for cat in post.categories %}
                        <span class="meta-info">
                          <span class="octicon octicon-file-directory"></span>
                          <a href="{{ site.url }}/categories/#{{ cat }}" title="{{ cat }}">{{ cat }}</a>
                        </span>
                        {% endfor %}
                    </p>
                </li>
                {% endfor %}
            </ol>
        </div>
        <div class="column one-third">
            {% include sidebar-search.html %}
            {% include sidebar-popular-repo.html %}
        </div>
    </div>
	<div class="pagination text-align">
		<div class="btn-group mobile-visible">
		{% if paginator.previous_page %}
		  {% if paginator.previous_page == 1 %}
			  <a href="{{ site.url }}/" class="btn btn-outline">&laquo;</a>
		  {% else %}
			  <a href="{{ site.url }}/page/{{paginator.previous_page}}/"  class="btn btn-outline">&laquo;</a>
		  {% endif %}
		{% else %}
			<button disabled="disabled" href="javascript:;" class="btn btn-outline">&laquo;</button>
		{% endif %}
		
		{% if paginator.page == 1 %}
			<a href="javascript:;" class="active btn btn-outline">1</a>
		{% else %}
			<a href="{{ site.url }}/"  class="btn btn-outline">1</a>
		{% endif %}
		{% if paginator.total_pages > 1 %}
		  {% assign mpageSize = 1 %}
		  {% assign mtmp1 = mpageSize | times:2 %}
		  {% assign mtmp = mtmp1 | plus:5 %}
		  {% assign mtmp2 = mtmp1 | plus:3 %}
		  {% assign mtmp3 = mtmp1 | plus:2 %}
		  {% assign mtmp4 = mtmp1 | plus:1 %}
		  {% assign mtmp5 = paginator.total_pages | minus:1 %}
		  {% assign mtmp6 = paginator.total_pages | minus:mtmp4 %}
		  {% assign mtmp7 = paginator.total_pages | minus:mtmp3 %}

		  {% if mtmp >= paginator.total_pages %}
			{% for count in (2..mtmp5) %}
			  {% if count == paginator.page %}
				  <a href="javascript:;"  class="active btn btn-outline">{{count}}</a>
			  {% else %}
				  <a href="{{ site.url }}/page/{{count}}/"  class="btn btn-outline">{{count}}</a>
			  {% endif %}
			{% endfor %}
		  {% else %}
			{% if mtmp3 >= paginator.page %}
			  {% assign mstartPage = 2 %}
			  {% assign mendPage = mtmp2 %}
			{% elsif paginator.page >= mtmp6 %}
			  {% assign mstartPage = mtmp7 %}
			  {% assign mendPage = mtmp5 %}
			{% else %}
			  {% assign mstartPage = paginator.page | minus:mpageSize %}
			  {% assign mendPage = paginator.page | plus:mpageSize %}
			{% endif %}  
			{% if paginator.page > mtmp3 %}
			    <button disabled="disabled" href="javascript:;" class="btn btn-outline">…</button>
			{% endif %}  
			{% for count in (mstartPage..mendPage) %}
			  {% if count == paginator.page %}
				  <a href="javascript:;"  class="active btn btn-outline">{{count}}</a>
			  {% else %}
				  <a href="/page/{{count}}/"  class="btn btn-outline">{{count}}</a>
			  {% endif %}
			{% endfor %}
			  
			{% if mtmp6 > paginator.page %}
		  	    <button disabled="disabled" href="javascript:;" class="btn btn-outline">…</button>
		    {% endif %}
		  {% endif %}

		  {% if paginator.next_page %}
			  <a href="/page/{{paginator.total_pages}}/"  class="btn btn-outline">{{paginator.total_pages}}</a>
		  	  <a href="/page/{{paginator.next_page}}/"  class="btn btn-outline">&raquo;</a>
		  {% else %}
			  <a href="javascript:;"  class="active btn btn-outline">{{paginator.total_pages}}</a>
			  <button disabled="disabled" href="javascript:;" class="btn btn-outline">&raquo;</button>
		  {% endif %}
		{% else %}
		  <button disabled="disabled" href="javascript:;" class="btn btn-outline">&raquo;</button>
		{% endif %}
		</div>
		<div class="btn-group mobile-hidden">
		{% if paginator.previous_page %}
		  {% if paginator.previous_page == 1 %}
			  <a href="{{ site.url }}/" class="btn btn-outline">&laquo;</a>
		  {% else %}
			  <a href="{{ site.url }}/page/{{paginator.previous_page}}/"  class="btn btn-outline">&laquo;</a>
		  {% endif %}
		{% else %}
			<button disabled="disabled" href="javascript:;" class="btn btn-outline">&laquo;</button>
		{% endif %}
		
		{% if paginator.page == 1 %}
			<a href="javascript:;" class="active btn btn-outline">1</a>
		{% else %}
			<a href="{{ site.url }}/"  class="btn btn-outline">1</a>
		{% endif %}
		{% if paginator.total_pages > 1 %}
		  {% assign pageSize = 2 %}
		  {% assign tmp1 = pageSize | times:2 %}
		  {% assign tmp = tmp1 | plus:5 %}
		  {% assign tmp2 = tmp1 | plus:3 %}
		  {% assign tmp3 = tmp1 | plus:2 %}
		  {% assign tmp4 = tmp1 | plus:1 %}
		  {% assign tmp5 = paginator.total_pages | minus:1 %}
		  {% assign tmp6 = paginator.total_pages | minus:tmp4 %}
		  {% assign tmp7 = paginator.total_pages | minus:tmp3 %}

		  {% if tmp >= paginator.total_pages %}
			{% for count in (2..tmp5) %}
			  {% if count == paginator.page %}
				  <a href="javascript:;"  class="active btn btn-outline">{{count}}</a>
			  {% else %}
				  <a href="{{ site.url }}/page/{{count}}/"  class="btn btn-outline">{{count}}</a>
			  {% endif %}
			{% endfor %}
		  {% else %}
			{% if tmp3 >= paginator.page %}
			  {% assign startPage = 2 %}
			  {% assign endPage = tmp2 %}
			{% elsif paginator.page >= tmp6 %}
			  {% assign startPage = tmp7 %}
			  {% assign endPage = tmp5 %}
			{% else %}
			  {% assign startPage = paginator.page | minus:pageSize %}
			  {% assign endPage = paginator.page | plus:pageSize %}
			{% endif %}  
			{% if paginator.page > tmp3 %}
			    <button disabled="disabled" href="javascript:;" class="btn btn-outline">…</button>
			{% endif %}  
			{% for count in (startPage..endPage) %}
			  {% if count == paginator.page %}
				  <a href="javascript:;"  class="active btn btn-outline">{{count}}</a>
			  {% else %}
				  <a href="/page/{{count}}/"  class="btn btn-outline">{{count}}</a>
			  {% endif %}
			{% endfor %}
			  
			{% if tmp6 > paginator.page %}
		  	    <button disabled="disabled" href="javascript:;" class="btn btn-outline">…</button>
		    {% endif %}
		  {% endif %}

		  {% if paginator.next_page %}
			  <a href="/page/{{paginator.total_pages}}/"  class="btn btn-outline">{{paginator.total_pages}}</a>
		  	  <a href="/page/{{paginator.next_page}}/"  class="btn btn-outline">&raquo;</a>
		  {% else %}
			  <a href="javascript:;"  class="active btn btn-outline">{{paginator.total_pages}}</a>
			  <button disabled="disabled" href="javascript:;" class="btn btn-outline">&raquo;</button>
		  {% endif %}
		{% else %}
		  <button disabled="disabled" href="javascript:;" class="btn btn-outline">&raquo;</button>
		{% endif %}
		</div>
	</div>
	<!-- /pagination -->
</section>
<!-- /section.content -->
